<html>
<head><meta charset="utf-8"><title>failing to find musl-root (1.45.2) · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html">failing to find musl-root (1.45.2)</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207733702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failing%20to%20find%20musl-root%20%281.45.2%29/near/207733702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Grommish <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html#207733702">(Aug 22 2020 at 17:21)</a>:</h4>
<p>I'm trying to integrate rustc/cargo into OpenWrt, and I need to build from source.<br>
When calling x.py build, it fails on the sanity check for MUSL's root.  <a href="https://pastebin.com/ArvipMW1">https://pastebin.com/ArvipMW1</a><br>
I am setting both the --musl-root and --musl-root-mips64 (since musl-root is showing depreciated), and it still panics..    The toolchain root (/home/grommish/openwrt/staging_dir/toolchain-mips64_octeonplus_64_gcc-10.1.0_musl) has the lib/libc.a file present.  </p>
<p>Would anyone be willing to tell me what I missed?</p>



<a name="207733760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failing%20to%20find%20musl-root%20%281.45.2%29/near/207733760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html#207733760">(Aug 22 2020 at 17:23)</a>:</h4>
<blockquote>
<p>thread 'main' panicked at 'when targeting MUSL either the rust.musl-root option or the target.$TARGET.musl-root option must be specified in config.toml', src/bootstrap/sanity.rs:208:25</p>
</blockquote>
<p>does it work if you add <code>musl-root</code> to config.toml instead of a CLI argument ?</p>



<a name="207733768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failing%20to%20find%20musl-root%20%281.45.2%29/near/207733768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html#207733768">(Aug 22 2020 at 17:23)</a>:</h4>
<p>(it's still a bug if so but it would give you a workaround in the meantime)</p>



<a name="207734081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failing%20to%20find%20musl-root%20%281.45.2%29/near/207734081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Grommish <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html#207734081">(Aug 22 2020 at 17:32)</a>:</h4>
<p><a href="https://pastebin.com/bYQTyYtK">https://pastebin.com/bYQTyYtK</a></p>
<p>That is my config.toml that is output.  It does set the --musl-root in the $TARGET, but doesn't for the other (rust or general? I don't recall offhand)</p>



<a name="207734247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failing%20to%20find%20musl-root%20%281.45.2%29/near/207734247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html#207734247">(Aug 22 2020 at 17:36)</a>:</h4>
<p>right, you're setting it with CLI flags but not with the <code>musl-root</code> setting:</p>
<div class="codehilite"><pre><span></span><code><span class="c1"># The root location of the MUSL installation directory.</span>
<span class="c1">#musl-root = &quot;...&quot;</span>
</code></pre></div>


<p>if you set that, does it help?</p>



<a name="207734337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/failing%20to%20find%20musl-root%20%281.45.2%29/near/207734337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Grommish <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/failing.20to.20find.20musl-root.20(1.2E45.2E2).html#207734337">(Aug 22 2020 at 17:39)</a>:</h4>
<p>Let me check.. the issue I'm having is that I'm trying to do this within Openwrt's Buildroot, so I want to make sure everything is where i think it is before I cry foul..</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>